/summon villager ~ ~2 ~ {VillagerData:{profession:librarian,level:5,type:plains},Offers:{Recipes:[
{buy:{id:stone,Count:32}
,buyB:{id:polished_andesite,Count:8}
,sell:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 1\",\"color\":\"gray\"}"},AttributeModifiers:
[
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]},maxUses:9999999}},

{buy:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 1\",\"color\":\"gray\"}"},AttributeModifiers:
[
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:stone,Count:2,tag:
{display:{Name:"{\"text\":\"Stone Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 2\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.32,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 2\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.32,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:stone,Count:4,tag:
{display:{Name:"{\"text\":\"Stone Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 3\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.46,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 3\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.46,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:stone,Count:8,tag:
{display:{Name:"{\"text\":\"Stone Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 4\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 4\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:stone,Count:16,tag:
{display:{Name:"{\"text\":\"Stone Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_chirp,Count:1,tag:
{display:{Name:"{\"text\":\"Stone Talisman Level 5\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:6,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.8,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999}]}}